package org.jeecg.controller;

import org.jeecg.config.shiro.IgnoreAuth;
import org.jeecg.modules.base.service.impl.CeshiServiceImpl;
import org.jeecg.pojo.Ceshi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class CeShiController {
    @Autowired
    private CeshiServiceImpl ceshiService;

    @GetMapping("/hello")
    @IgnoreAuth
    public String sayHello(@RequestParam Integer id){
        Ceshi ceshi = ceshiService.gethelloByid(id);
        if (ceshi !=null){
            return "你好" + ceshi.getName();
        }else
        return  "请重新输入";
    }
}
